package xyz.lxbq.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor

public class TClass {

  private long id;
  private long majorId;

  @NotNull(message = "班级名不能空")
  @Length(min = 5,max = 10,message = "班级名只能5到10位之间")
  private String className;

//  @Future(message = "输入日期不能小于当前日期")
//  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private String classDate;
  private String classTime;
  private String classAddress;
  private long classDelete;
  private String majorname;


  public TClass(long majorId, String className, String classDate, String classTime, String classAddress,String majorname) {
    this.majorId = majorId;
    this.className = className;
    this.classDate = classDate;
    this.classTime = classTime;
    this.classAddress = classAddress;
    this.majorname = majorname;
  }

  public TClass(int majorId, String className, String classDate, String classTime, String classAddress) {
    this.majorId = majorId;
    this.className = className;
    this.classDate = classDate;
    this.classTime = classTime;
    this.classAddress = classAddress;
  }
}
